{extend name='layout/main' /}

{block name='main'}
<div class="title">交易管理 > 委托信息查询</div>
<div class="filter">
    <form action="#" method="get" id="filter_form">
        <span>客户名称：<input type="text" name="name"  value="{$name}"></span>
        <span>交易账号：<input type="text" name="account"  value="{$account}"></span>
        <span class="time">起始时间：<input type="text" readonly name="start_time" value="{$start_time}"  onclick="laydate()"><i class="iconfont">&#xe631;</i></span>
        <span class="time">终止时间：<input type="text" readonly name="end_time" value="{$end_time}"  onclick="laydate()"><i class="iconfont">&#xe631;</i></span>
        <span><input type="submit" value="查询"></span>
    </form>
</div>
<div class="table data_table">
    <table id="userlist">
        <tr>
            <th>编号</th>
            <th>单号</th>
            <th>用户名</th>
            <th>姓名</th>
            <th>交易账号</th>

            <th>时间</th>
            <th>商品名称</th>
            <th>买卖类型</th>
            <th>委托价格</th>
            <th>委托数量</th>
            <th>类型</th>
            <th>状态</th>
        </tr>
        {if $list}
        {foreach $list as $key=>$it}
        <tr>
            <td>{$key+1}</td>
            <td>{$it.order_num}</td>
            <td>{$it.user}</td><!--用户名-->
            <td>{$it.user_name}</td><!--姓名-->
            <td>{$it.account}</td>

            <td>{$it.time|format}</td>
            <td>{$it.goods}</td>
            <td>{if $it.goods_type eq 'B'}买{else}卖{/if}</td>
            <td>{$it.entrust_price}</td>
            <td>{$it.entrust_num}</td>
            <td>
                {if $it.entrust_type eq '1'}
                限价{else}市价
                {/if}
            </td>
            <td>
                {if $it.state eq '9'}完全成交{/if}
                {if $it.state eq '8'}部分成交{/if}
                {if $it.state eq '7'}完全撤单{/if}
                {if $it.state eq '6'}部分撤单{/if}
                {if $it.state eq '5'}已排队{/if}
                {if $it.state eq '4'}已挂起{/if}
                {if $it.state eq '3'}已受理{/if}
                {if $it.state eq '2'}指令失败{/if}
            </td>
        </tr>
        {/foreach}
        {/if}
    </table>
</div>

{if $list}
<div class="page">
    {$list->render()} <div class="page_record">共<strong>{$list->total()}</strong>条数据，每页显示：<strong>{$list->listRows()}</strong>条记录</div>
</div>
{/if}

{/block}

{block name="javascript"}
<script src="/asset/js/lib/laydate/laydate.js"></script>
<script>



</script>
{/block}
